home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1991: Code Warrior / bincue / Code Warrior.bin / Development Platforms (Moof!) / Apple II / Essentials / GSBug / GSBug.Specs < prev    next >
Encoding:
Text File  |  1991-09-05  |  25.6 KB  |  1,713 lines  |  [TEXT/MWII]

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. GSBug
  9.  
  10.  
  11. Current Version 1.6b20
  12.  
  13.  
  14.  
  15.  
  16. Version 1.6b20 (DAL)
  17.  
  18.  
  19. Added new GS/OS call name SetStdRefNum, call number $203A.
  20.  
  21.  
  22. Fixed the version string so it doesn’t say “Apple Confidential.”
  23.  
  24.  
  25.  
  26. Version 1.6b19 (DAL)
  27.  
  28.  
  29.  
  30. To automatically load a templates file at boot time, it must be named 
  31. GSBug.AutoTemp 
  32.  
  33. (in the System.Setup folder).
  34.  
  35.  
  36.  
  37. If you use LoadTemp without a pathname, it still defaults to 
  38. GSBug.Templates.
  39.  
  40.  
  41.  
  42.  
  43. Version  1.6b18 (DAL)
  44.  
  45.  
  46.  
  47. Versions with 6.0 stuff included are now 1.6bxx; without 6.0 stuff is still 
  48. 1.5bxx.
  49.  
  50.  
  51.  
  52. LoadTemp command no longer returns a bogus error after successfully 
  53. loading a 
  54.  
  55. templates file.  Also, if you type LoadTemp with no pathname, it uses 
  56.  
  57. */System/System.Setup/GSBug.Templates.
  58.  
  59.  
  60.  
  61. Turned off high bits on the GSBug.Setup file pathname, so you don’t get a 
  62. strange 
  63.  
  64. error while booting from an AppleShare server.
  65.  
  66.  
  67.  
  68. KNOWN BUG:  Don’t put a breakpoint on an imbedded name.  If you do, the 
  69. name gets 
  70.  
  71. overwritten when the breakpoint is removed.
  72.  
  73.  
  74.  
  75. Version 1.5b17 (DAL)
  76.  
  77.  
  78.  
  79. Now supports inline imbedded procedure names (as generated by the name 
  80. and 
  81.  
  82. procname macros in M16.Debug, for example).  These show up in 
  83. disassembly and as 
  84.  
  85. the operands of JSRs and JSLs.
  86.  
  87.  
  88.  
  89. OSBreaks trigger regardless of call class now.  For example, you can 
  90. SetOSBrk for 
  91.  
  92. either Open or OpenGS, and either one will cause a break.
  93.  
  94.  
  95.  
  96. Changed named-resource call names to begin with RM 
  97. (RMLoadNamedResource, 
  98.  
  99. etc).
  100.  
  101.  
  102.  
  103. When GSBug notices a toolbox call being made in other than full 16-bit 
  104. mode, it 
  105.  
  106. displays a a warning dialog (using TLTextMountVolume).  Hitting ESC at 
  107. that dialog 
  108.  
  109. cancels future warnings until you reload GSBug.
  110.  
  111.  
  112.  
  113. When GSBug notices a toolbox call being made with Decimal mode on, it 
  114. stops cold at 
  115.  
  116. a BRK $F8, rather than letting things get completely baked before 
  117. crashing.
  118.  
  119.  
  120.  
  121. Fixed one old reference to $010100 to store $C0 instead of $80.  
  122. Interrupts should 
  123.  
  124. reliably use $100..1C0 for stack space now.
  125.  
  126.  
  127.  
  128. Added 5 blanks to end of 'TRACE ' message so it completely overwrites the 
  129. 'SINGLE 
  130.  
  131. STEP' message.
  132.  
  133.  
  134.  
  135.  
  136. Version 1.5b16 (DAL)
  137.  
  138.  
  139.  
  140. No such thang.
  141.  
  142.  
  143.  
  144.  
  145. Version 1.5b15 (DAL)
  146.  
  147.  
  148.  
  149. Option-space now works reliably to bypass a memory-protect range, 
  150. including a tool 
  151.  
  152. call.  (This is an old feature, but keyboard translation normally prevented 
  153. it from 
  154.  
  155. working!)
  156.  
  157.  
  158.  
  159. In trace mode, Space and ESC now kill "awainting RTx" mode.
  160.  
  161.  
  162.  
  163. Fixed "n" command so it won't crash if nobody has called DebugSetHook.
  164.  
  165.  
  166.  
  167. Having tool breaks on calls which get made indirectly by GSBug no longer 
  168. cause a 
  169.  
  170. crash.  You can break on NewHandle now, for example.
  171.  
  172.  
  173.  
  174. In Breakpoint subscreen, Space maps trigger count from 0 to 1 and from 
  175. nonzero to 
  176.  
  177. zero.  Tab moves between the address and count fields (easier than hitting 
  178. arrows).
  179.  
  180.  
  181.  
  182. In the memory-protect subscreen, Tab moves between columns.
  183.  
  184.  
  185.  
  186. Added $01/FC00.FFFF (OS system service calls) to the memory protect 
  187. list.
  188.  
  189.  
  190.  
  191. Changed the default trace-window setting to center-screen.
  192.  
  193.  
  194.  
  195. Changed the EmulStack value from $80 to $C0 (trying to get rid of some 
  196. unpredictable 
  197.  
  198. crashes, probably caused by AppleTalk running out of stack space).  This 
  199. means you 
  200.  
  201. can safely trace a program while the stack is in the $01C1..01FF range, 
  202. and that 
  203.  
  204. interrupts use $0100..01C0.
  205.  
  206.  
  207.  
  208. GSBug now takes a whole bank, minimizing its effect on where things are 
  209. located in 
  210.  
  211. memory relative to each other, and ensuring that tool breaks work reliably 
  212. (tool calls 
  213.  
  214. never break if they come from the same bank the debugger is in).
  215.  
  216.  
  217.  
  218. Note that templates do work; you can ignore the garbage error you still get 
  219. from 
  220.  
  221. loadtemp.
  222.  
  223.  
  224.  
  225.  
  226. Version 1.5b14 (DAL)
  227.  
  228.  
  229.  
  230. Versions 1.5b12 and b13 were never officially released.  1.5b14 is fine, 
  231. except that I 
  232.  
  233. make no guarantees about the Template commands.  I think they work, but 
  234. you’ll get a 
  235.  
  236. funky error message from loadtemp.
  237.  
  238.  
  239.  
  240. When you let a JSL execute in real time (including a tool call), the 
  241. debugger 
  242.  
  243. temporarily changes the owner ID of its own handle to match the owner of 
  244. the handle 
  245.  
  246. containing the code you’re debugging.  This way MMStartUp returns the 
  247. appropriate 
  248.  
  249. memory ID, instead of always returning the debugger’s ID.
  250.  
  251.  
  252.  
  253. DebugSetHook(nil) now removes the hook.
  254.  
  255.  
  256.  
  257. The 1K bank 0 segment GSBug allocates now has the same ID as the 
  258. debugger (was 
  259.  
  260. previously always $80xx).
  261.  
  262.  
  263.  
  264. Fixed OS breaks to work after return from ProDOS 8 (added a Notify Proc 
  265. to re-trap the 
  266.  
  267. OS vectors).
  268.  
  269.  
  270.  
  271. Changed the “_” command so that if you don’t type a number, it’s like 
  272. typing zero.  For 
  273.  
  274. example, if you have a template called “Template” which displays an 
  275. informational 
  276.  
  277. message, you can type “_Template” instead of “_Template 0”.
  278.  
  279.  
  280.  
  281. DP:xxx command dumps 16 bytes from DP to the command line.
  282.  
  283.  
  284.  
  285. Tool call $0CFF DebugGetInfo(word):long.  Word=0 returns the current 
  286. value of the 
  287.  
  288. program counter (useful from a procedure called by the N command).
  289.  
  290.  
  291.  
  292. Note that real-time counted breakpoints don't work for JMP() ($6C), 
  293. JMP(,X) ($7C), 
  294.  
  295. JML() ($DC), and JSR(,X) ($FC).
  296.  
  297.  
  298.  
  299. With Monte's help, located the misplaced CLI that was causing the X 
  300. command used 
  301.  
  302. on a JSR to accidentally return with the Bank register set to the 
  303. debugger's bank, and 
  304.  
  305. the Stack set to the Interrupt-time stack.
  306.  
  307.  
  308.  
  309. Version 1.5b11 (DAL)
  310.  
  311.  
  312.  
  313.  
  314. You can use SetOSBrk and ClrOSBRK with call names now.  Class-1 names 
  315. all end
  316.  
  317.  
  318. in GS to distinguish them from their class-0 siblings.  Examples:
  319.  
  320.  
  321.  
  322.     SetOSBrk #1
  323.  
  324.  
  325.  
  326.     SetOSBrk _Create
  327.  
  328.  
  329.  
  330.     SetOSBrk #2001
  331.  
  332.  
  333.  
  334.     SetOSBrk _CreateGS
  335.  
  336.  
  337.  
  338.  
  339. The debugger now changes its own handleUs memory ID during a real-time 
  340. JSL to 
  341.  
  342.  
  343. match the code being stepped.  For example, now you can step over an 
  344. MMStartUp 
  345.  
  346.  
  347. and get the expected ID returned (the application's instead of the 
  348. debugger's).
  349.  
  350.  
  351.  
  352.  
  353. Changed 'D' command to 'I' so it doesn't interfere with typing a hex number
  354.  
  355.  
  356. that starts with a D.  The I command toggles the 'ignore REP/SEP 
  357. instructions
  358.  
  359.  
  360. mode' when disassembling.
  361.  
  362.  
  363.  
  364.  
  365. Changed parsing for the P (Print screen) command so that it just beeps if 
  366. there are any 
  367.  
  368.  
  369. characters after the P.  (Typing 'put' intead of 'out' can no longer hang your 
  370.  
  371.  
  372. system.)
  373.  
  374.  
  375.  
  376.  
  377. Put the help screen for MP mode back in.
  378.  
  379.  
  380.  
  381.  
  382. The solid flashing cursor in MEM, MP, and BP no longer flashes.  In 
  383. exchange
  384.  
  385.  
  386. for this, special characters (like braces) that happen to be in Inverse don't
  387.  
  388.  
  389. flash while you're in the subscreens.
  390.  
  391.  
  392.  
  393.  
  394. Added pseudo tool call $0BFF=DebugSetHook (one Long parameter).  The N
  395.  
  396.  
  397. ("neat- o") command calls this hook.
  398.  
  399.  
  400.  
  401.  
  402. Removed a conditional hard-coded increment of $004002 when X-ing a 
  403. JSR.
  404.  
  405.  
  406.  
  407.  
  408. Added REP #$30 on the two tool-dispatcher-intercept routines.  Making 
  409. tool
  410.  
  411.  
  412. calls in other than full native mode is still not a good idea.
  413.  
  414.  
  415.  
  416.  
  417. Fixed real-time breakpoints for most 1-byte instructions and all 16-bit 
  418. load
  419.  
  420.  
  421. immediate instructions.  Previously, they crashed when used with a count
  422.  
  423.  
  424. greater than one.
  425.  
  426.  
  427.  
  428.  
  429. Please note that */System/System.Setup/GSBug.Setup is *already* loaded 
  430.  
  431.  
  432. automatically (has been for quite a while).
  433.  
  434.  
  435.  
  436.  
  437.  
  438. Version 1.5b10 (DAL)
  439.  
  440.  
  441.  
  442.  
  443. Stepping in emulation mode should be much more reliable now, although it 
  444. isn't 
  445.  
  446.  
  447. perfect (in particular, one place where there's a window of vulnerability 
  448. is
  449.  
  450.  
  451. using X on a JSR in emulation mode, but if you have the I bit set in your P
  452.  
  453.  
  454. register there's no problem).
  455.  
  456.  
  457.  
  458.  
  459. Having the stack in $01xx works much better now, whether you're in 
  460. emulation
  461.  
  462.  
  463. or not.  This works by frequently stuffing a $80 into $01/0100 
  464. (EMULSTACK,
  465.  
  466.  
  467. the location the interrupt manager and other things used to set the $01xx
  468.  
  469.  
  470. stack when needed).
  471.  
  472.  
  473.  
  474.  
  475. If you trace code that actually uses the $01/0100 value to set the stack
  476.  
  477.  
  478. pointer, you still have a problem, since your program will start using the
  479.  
  480.  
  481. part of the stack that gets toasted on every interrupt.
  482.  
  483.  
  484.  
  485.  
  486. You can now type in GSBug even if the Event Manager is on but keyboard
  487.  
  488.  
  489. interrupts are off.  Previously this would leave you dead in the water.
  490.  
  491.  
  492.  
  493.  
  494. Files created with CSave now have a real filetype/auxtype assignment 
  495. ($5A/0005).
  496.  
  497.  
  498.  
  499.  
  500. Fixed DebugStr to return no error (previously it was returning the high 
  501. two
  502.  
  503.  
  504. bytes of the caller's address as an error).
  505.  
  506.  
  507.  
  508.  
  509. Took out code that was checking $C020 (not SLOTREG at $C02D) to see if 
  510. the
  511.  
  512.  
  513. printer slot was switched in.  Makes no sense anyway, because a printer 
  514. can
  515.  
  516.  
  517. legitimately be either an internal or external slot.
  518.  
  519.  
  520.  
  521.  
  522. Brought the list of Toolbox call names up to date for System Software 
  523. 5.0.3
  524.  
  525.  
  526. (see changes below).
  527.  
  528.  
  529.  
  530.  
  531. Added tool set names (for example, $0002 is Memory Manager).  For some 
  532. time, 
  533.  
  534.  
  535. you've been able to use SetTBrk with a tool set number, to force a break on
  536.  
  537.  
  538. every call to that tool set.  Now you can do it by name, too.
  539.  
  540.  
  541.  
  542. Examples:
  543.  
  544.  
  545.  
  546.     SetTBrk #2
  547.  
  548.  
  549.  
  550.     SetTBrk _Memory Manager
  551.  
  552.  
  553.  
  554.     ShowBrks
  555.  
  556.  
  557.  
  558.  
  559. Saved about 900 bytes by removing many extra copies of the string 
  560. "Unknown".
  561.  
  562.  
  563.  
  564.  
  565. Obsolete call names removed:
  566.  
  567.  
  568.  
  569. 1522    TEInsertPageBreak
  570.  
  571.  
  572. 2022    TEGetHooks
  573.  
  574.  
  575. 2122    TESetHooks
  576.  
  577.  
  578. 2222    TEGetDefProc
  579.  
  580.  
  581.  
  582.  
  583. Call names corrected:
  584.  
  585.  
  586.  
  587. 0D02    RemoveFromOOMQueue
  588.  
  589.  
  590. 2115    SelectIText
  591.  
  592.  
  593. 1021    VDKeyGetKRCol
  594.  
  595.  
  596. 1121    VDKeyGetKGCol
  597.  
  598.  
  599. 1221    VDKeyGetKBCol
  600.  
  601.  
  602.  
  603.  
  604.  
  605. Call names added:
  606.  
  607.  
  608.  
  609. 3603    ReleaseROMResource  3703    ConvSeconds     010A    SANEBootInit
  610.  
  611.  
  612. 020A    SANEStartUp         030A    SANEShutDown    040A    SANEVersion
  613.  
  614.  
  615. 050A    SANEReset           060A    SANEStatus      090A    FPNum
  616.  
  617.  
  618. 0A0A    DecStrNum           0B0A    ElemNum         5D0E    
  619. TaskMasterContent
  620.  
  621.  
  622. 5E0E    TaskMasterKey       1713    GetDeviceName   1813    
  623. PrGetPrinterSpecs
  624.  
  625.  
  626. 1913    PrDevPrChanged      1A13    PrDevStartup    1B13    PrDevShutDown
  627.  
  628.  
  629. 1C13    PrDevOpen           1D13    PrDevRead       1E13    PrDevWrite
  630.  
  631.  
  632. 1F13    PrDevClose          2013    PrDevStatus     2113    PrDevAsyncRead
  633.  
  634.  
  635. 2213    PrDevWriteBackground    3013    PrDevIsItSafe   2022    
  636. TEOffsetToPoint
  637.  
  638.  
  639. 2122    TEPointToOffset     2222    TEGetDefProc    2322    TEGetRuler
  640.  
  641.  
  642. 2422    TESetRuler          2522    TEScroll        2622    TEGetInternalProc
  643.  
  644.  
  645. 2722    TEGetLastError      2822    TECompactRecord
  646.  
  647.  
  648. 0123    MSBoot              0223    MSStartUp       0323    MSShutDown
  649.  
  650.  
  651. 0423    MSVersion           0523    MSReset         0623    MSStatus
  652.  
  653.  
  654. 0923    SetBasicChan        0A23    SetMIDIMode     0B23    PlayNote
  655.  
  656.  
  657. 0C23    StopNote            0D23    KillAllNotes    0E23    SetRecTrack
  658.  
  659.  
  660. 0F23    SetPlayTrack        1023    TrackToChan     1123    Locate
  661.  
  662.  
  663. 1223    SetVelComp          1323    SetMIDIPort     1423    SetInstrument
  664.  
  665.  
  666. 1523    SeqPlayer           1623    SetTempo        1723    SetCallBack
  667.  
  668.  
  669. 1823    SysExOut            1923    SetBeat         1A23    MIDIMessage
  670.  
  671.  
  672. 1B23    LocateEnd           1C23    Merge           1D23    DeleteTrack
  673.  
  674.  
  675. 1E23    SetMetro            1F23    GetMSData       2023    ConvertToTime
  676.  
  677.  
  678. 2123    ConvertToMeasure    2223    MSSuspend       2323    MSResume
  679.  
  680.  
  681. 2423    SetTuningTable      2523    GetTuningTable  2623    SetTrackOut
  682.  
  683.  
  684. 2723    StartMIDIDriver     2823    StopMIDIdriver  04FF    DebugVersion
  685.  
  686.  
  687. 06FF    DebugStatus         09FF    DebugStr        0AFF    SetMileStone
  688.  
  689.  
  690.  
  691.  
  692.  
  693. Tool Set Names  (You can use these with SetTBrk.)
  694.  
  695.  
  696.  
  697. 0001    Tool Locator
  698.  
  699.  
  700. 0002    Memory Manager
  701.  
  702.  
  703. 0003    Misc Tools
  704.  
  705.  
  706. 0004    QuickDraw
  707.  
  708.  
  709. 0005    Desk Manager
  710.  
  711.  
  712. 0006    Event Manager
  713.  
  714.  
  715. 0007    Scheduler
  716.  
  717.  
  718. 0008    Sound Tools
  719.  
  720.  
  721. 0009    ADB
  722.  
  723.  
  724. 000A    SANE
  725.  
  726.  
  727. 000B    Integer Math
  728.  
  729.  
  730. 000C    Text Tools
  731.  
  732.  
  733. 000E    Window Manager
  734.  
  735.  
  736. 000F    Menu Manager
  737.  
  738.  
  739. 0010    Control Manager
  740.  
  741.  
  742. 0011    Loader
  743.  
  744.  
  745. 0012    QuickDraw Aux
  746.  
  747.  
  748. 0013    Print Manager
  749.  
  750.  
  751. 0014    Line Edit
  752.  
  753.  
  754. 0015    Dialog Manager
  755.  
  756.  
  757. 0016    Scrap Manager
  758.  
  759.  
  760. 0017    Standard File
  761.  
  762.  
  763. 0019    Note Synth
  764.  
  765.  
  766. 001A    Note Seq
  767.  
  768.  
  769. 001B    Font Manager
  770.  
  771.  
  772. 001C    List Manager
  773.  
  774.  
  775. 001D    ACE
  776.  
  777.  
  778. 001E    Resource Manager
  779.  
  780.  
  781. 0020    Midi
  782.  
  783.  
  784. 0021    Video Overlay
  785.  
  786.  
  787. 0022    Text Edit
  788.  
  789.  
  790. 0023    MIDI Synth
  791.  
  792.  
  793. 00FF    Debugger
  794.  
  795.  
  796.  
  797.  
  798.  
  799. GS/OS Call Names
  800.  
  801.  
  802.  
  803. Brought the list of GS/OS call names up to date for System Software 5.0.3.
  804.  
  805.  
  806.  
  807.  
  808. Removed this call:
  809.  
  810.  
  811.  
  812. $000E   ExpandPath (becuase there's no class-0 version)
  813.  
  814.  
  815.  
  816.  
  817. Added these class-1 call names:
  818.  
  819.  
  820.  
  821. $2029   Quit
  822.  
  823.  
  824. $2033   FSTSpecific
  825.  
  826.  
  827. $2034   AddNotifyProc
  828.  
  829.  
  830. $2035   DelNotifyProc
  831.  
  832.  
  833. $2036   DRename
  834.  
  835.  
  836. $2037   GetStdRefNum
  837.  
  838.  
  839. $2038   GetRefNum
  840.  
  841.  
  842. $2039   GetRefInfo
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849. What It Doesn't Do Yet
  850.  
  851.  
  852.  
  853.  
  854. Note--sometimes the debugger gets mysteriously disconnected from the
  855.  
  856.  
  857. Apple-Ctl-ESC vector.  If you can reproduce this, let me know.
  858.  
  859.  
  860.  
  861.  
  862. Holding down Option occasionally overrides a memory-protect area, but
  863.  
  864.  
  865. sometimes it crashes instead.
  866.  
  867.  
  868.  
  869.  
  870. Some of the help screens are incompelete or inaccurate.
  871.  
  872.  
  873.  
  874.  
  875. Templates currently limited to 64K.  If template file >64K, it gets left 
  876. open
  877.  
  878.  
  879. by accident.
  880.  
  881.  
  882.  
  883.  
  884. There's a harmless problem where hitting SPACE to single-step an RTS
  885.  
  886.  
  887. sometimes doesn't do anything at all.
  888.  
  889.  
  890.  
  891.  
  892. Using X to execute a JSR real-time has problems sometimes.  It's been 
  893. known
  894.  
  895.  
  896. to scramble the B register (if anyone has a reproducible case, let me 
  897. know!),
  898.  
  899.  
  900. and I've seen it come back in $01/Fxxx space with the ROM enabled when 
  901. the
  902.  
  903.  
  904. language card was supposed to be.
  905.  
  906.  
  907.  
  908.  
  909. Breakpoints don't work quite right in bank-switched memory, either (it 
  910. doesn't
  911.  
  912.  
  913. store the original instruction into the right bank?).
  914.  
  915.  
  916.  
  917.  
  918. Should show OS call names on a JSL $E100B0 (examine stack if stepping, 
  919. and look 
  920.  
  921.  
  922. for a PEA $xxxx in a disassembly).
  923.  
  924.  
  925.  
  926.  
  927. Install notify procedure so OS breaks still work after coming back from
  928.  
  929.  
  930. ProDOS 8.
  931.  
  932.  
  933.  
  934.  
  935. The debugger chains into the tool-dispatcher vectors its own way.  It 
  936. should
  937.  
  938.  
  939. use the standard method defined in GS Technical Note #87.
  940.  
  941.  
  942.  
  943.  
  944. Should make the Init version take exactly 64K to avoid mucking up memory 
  945. use.
  946.  
  947.  
  948. This will also fix problems where tool calls made from the same bank as 
  949. GSBug
  950.  
  951.  
  952. never trigger a tool break.
  953.  
  954.  
  955.  
  956.  
  957. Will implement pseudo Tool calls to set and clear debugger breakpoints 
  958. under 
  959.  
  960.  
  961. program control.
  962.  
  963.  
  964.  
  965.  
  966. May make the MEM locations labelable (and save labels in the config file).
  967.  
  968.  
  969.  
  970.  
  971. RHandleS template partially implemented?
  972.  
  973.  
  974.  
  975.  
  976. Unload should call UserShutDown on self (under ProDOS 8, just beep 
  977. instead).
  978.  
  979.  
  980.  
  981.  
  982. Make sure that "\" for changing display modes is documented.
  983.  
  984.  
  985.  
  986.  
  987. Should load */System/System.Setup/GSBug.TMPL automatically.
  988.  
  989.  
  990.  
  991.  
  992.  
  993. Documentation
  994.  
  995.  
  996.  
  997.  
  998. The GSBug manual from APDA of 3/16/89 seems to be the latest there is.  
  999. All
  1000.  
  1001.  
  1002. features not covered there should be in these release notes.
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008. History
  1009.  
  1010.  
  1011.  
  1012.  
  1013. This part of the document details all changes made to the debugger from 
  1014. version 
  1015.  
  1016.  
  1017. 1.3b1 to 1.5b8.
  1018.  
  1019.  
  1020.  
  1021.  
  1022. Bug Fixes:
  1023.  
  1024.  
  1025.  
  1026. Real Time Tool Breaks - The mechanism for using tool breaks real time 
  1027. has
  1028.  
  1029.  
  1030. been modified, the old method never worked quite right, what used to 
  1031. happen
  1032.  
  1033.  
  1034. was that when a tool break was to occur, the stub in the dispatch vector
  1035.  
  1036.  
  1037. would simply jump into the debugger, this would cause the stack and 
  1038. processor
  1039.  
  1040.  
  1041. not to be set as if they came from an interupt, and the next exit of the
  1042.  
  1043.  
  1044. debugger would cause code execution to start at an inapropriate case, also
  1045.  
  1046.  
  1047. the actual tracing of a tool break would also cause the debugger to
  1048.  
  1049.  
  1050. improperly save the current registers, so that the stack/direct page and
  1051.  
  1052.  
  1053. processor status might come back damaged from a tool break. The stub has
  1054.  
  1055.  
  1056. been modified to now enter the debugger with a break instruction instead
  1057.  
  1058.  
  1059. of jumping to the front. This seems to solve all real time tool break
  1060.  
  1061.  
  1062. problems.
  1063.  
  1064.  
  1065.  
  1066. Error tool breaks - These also did not work well, and did not seem to be
  1067.  
  1068.  
  1069. used by anyone anyway, so they have been removed to make room for 
  1070. OSBreaks.
  1071.  
  1072.  
  1073.  
  1074. Version 1.5b3:
  1075.  
  1076.  
  1077. % display code was fixed so that the '*' would properly be displayed in
  1078.  
  1079.  
  1080.   front of any toolbox glue that is detected.
  1081.  
  1082.  
  1083. % Fixed template data display so that if the data being displayed crosses
  1084.  
  1085.  
  1086.   a bank boundry, the data is properly followed into the new bank.
  1087.  
  1088.  
  1089. % Modified the IN command so that it respects trigger counts of 0 and does
  1090.  
  1091.  
  1092.   not insert real time breaks.
  1093.  
  1094.  
  1095.  
  1096. Version 1.5b5:
  1097.  
  1098.  
  1099. % Added Glue tool break support. Now toolbreaks work for regular and glue
  1100.  
  1101.  
  1102.   tool breaks. ErrorBreaks do not work for glue as they do not make a lot
  1103.  
  1104.  
  1105.   of sense.
  1106.  
  1107.  
  1108. % Made debugger work even when a DA window is open. See new features 
  1109. below.
  1110.  
  1111.  
  1112. % Added keyClick so that you hear whenever the system draws a key from 
  1113. the
  1114.  
  1115.  
  1116.   event queue. Also, cleaned up some comments.
  1117.  
  1118.  
  1119.  
  1120. Version 1.5b6:
  1121.  
  1122.  
  1123. % Added new DebugStr toolcall that can be used to get more from the 
  1124. debugger.
  1125.  
  1126.  
  1127.  
  1128. Version 1.5b7:
  1129.  
  1130.  
  1131. % Added support for real time conditional breaks.
  1132.  
  1133.  
  1134. % Added OSBreaks.
  1135.  
  1136.  
  1137. % Fixed the Debugger tool calls (like DebugStr ) so that they use the proper
  1138.  
  1139.  
  1140.   tool numbers (they had the toolset number in the high byte instead of the
  1141.  
  1142.  
  1143.   low byte) Documentation for them should also be right.
  1144.  
  1145.  
  1146.  
  1147. Version 1.5b8:
  1148.  
  1149.  
  1150. % Added a debugger version and status call to the debugger tools.
  1151.  
  1152.  
  1153. % Enhanced the OSBreak facility.
  1154.  
  1155.  
  1156. % Removed the keyclicks because Dave complained.
  1157.  
  1158.  
  1159.  
  1160. Version 1.5b9:
  1161.  
  1162.  
  1163. % Fixed some bugs.
  1164.  
  1165.  
  1166.  
  1167.  
  1168. New Features:
  1169.  
  1170.  
  1171.  
  1172. DebugStr:
  1173.  
  1174.  
  1175. This feature is designed to allow developers to better know where in their
  1176.  
  1177.  
  1178. program the debugger was entered. The way this feature works is that if 
  1179. you
  1180.  
  1181.  
  1182. want to enter the debugger programatically you can now also pass a string 
  1183. to
  1184.  
  1185.  
  1186. the debugger which will be printed on the bottom line of the screen when 
  1187. the
  1188.  
  1189.  
  1190. debugger is entered.
  1191.  
  1192.  
  1193.  
  1194. The way this mechanism works is a fake tool call that the debugger now
  1195.  
  1196.  
  1197. supports. Since this looks like a normal tool call it can be easily called
  1198.  
  1199.  
  1200. by any high level language as well as by assembly language.  This toolcall
  1201.  
  1202.  
  1203. called DebugStr takes a single parameter, a pointer to a pascal string. 
  1204. When
  1205.  
  1206.  
  1207. the tool call is made the debugger is entered as if you had put a break
  1208.  
  1209.  
  1210. into your code, but the string you passed is displayed on the screen and
  1211.  
  1212.  
  1213. the program counter has been bumped passed the tool call jsl. This way 
  1214. you
  1215.  
  1216.  
  1217. can simply resume execution with two simple keystrokes (with the init
  1218.  
  1219.  
  1220. version hit 'R' <return>).
  1221.  
  1222.  
  1223.  
  1224. Calling this new feature might look something like this
  1225.  
  1226.  
  1227.  
  1228.         PushLong #DebugStr
  1229.  
  1230.  
  1231.         ldx #$09FF
  1232.  
  1233.  
  1234.         jsl >$E10000
  1235.  
  1236.  
  1237.  
  1238.     ...
  1239.  
  1240.  
  1241. DebugStr    str 'You are about to do blah.'
  1242.  
  1243.  
  1244.  
  1245. from pascal the same would be achieved by doing this...
  1246.  
  1247.  
  1248.  
  1249.         DebugStr('You are about to do blah.');
  1250.  
  1251.  
  1252.  
  1253. I would recommend that assembly language users use a macro to make the
  1254.  
  1255.  
  1256. toolcall and call it _DebugStr.  MPW IIGS Pascal users could use the
  1257.  
  1258.  
  1259. following to define the debugstr routine:
  1260.  
  1261.  
  1262.  
  1263.     Procedure DebugStr(theString:str255);
  1264.  
  1265.  
  1266.         INLINE $09FFA2, $E1000022;
  1267.  
  1268.  
  1269.  
  1270. This call will also work when being called via the glue vector. 
  1271.  
  1272.  
  1273. NOTE: Since this call is only available when the debugger is loaded you
  1274.  
  1275.  
  1276. will ALWAYS want to be sure to remove ALL calls to the debugger before
  1277.  
  1278.  
  1279. releasing your program (or even using it on machines that do not have a
  1280.  
  1281.  
  1282. debugger installed).
  1283.  
  1284.  
  1285.  
  1286.  
  1287. SetMileStone:
  1288.  
  1289.  
  1290. SetMileStone operates exactly the same way as debugstr except that the
  1291.  
  1292.  
  1293. debugger is not actually entered. This will allow tracking of random
  1294.  
  1295.  
  1296. crashes by allowing you to call the SetMileStone routine with milestones
  1297.  
  1298.  
  1299. that have been met. Any time the debugger is entered via a BRK instruction
  1300.  
  1301.  
  1302. or thru the keyboard, the last string passed via the SetMileStone call will
  1303.  
  1304.  
  1305. be displayed. The toolcall number for SetMileStone is $0AFF, the  MPW 
  1306. IIGS
  1307.  
  1308.  
  1309. Pascal interface might look like this:
  1310.  
  1311.  
  1312.  
  1313.     Procedure SetMileStone (theString:str255);
  1314.  
  1315.  
  1316.         INLINE $0AFFA2, $E1000022;
  1317.  
  1318.  
  1319.  
  1320.  
  1321. DebugVersion, DebugStatus:
  1322.  
  1323.  
  1324. These calls are added so that an application can identify the version of the
  1325.  
  1326.  
  1327. debugger that is loaded and thus know what calls can be made to the debug
  1328.  
  1329.  
  1330. tool. Currently, these calls are identical and return the same result. The
  1331.  
  1332.  
  1333. DebugStatus call returns non-zero for true (as opposed to $FFFF which 
  1334. most
  1335.  
  1336.  
  1337. people might want...) other than that these calls act the same as any other
  1338.  
  1339.  
  1340. toolbox status or version call, each call requires a word space on the 
  1341. stack
  1342.  
  1343.  
  1344. for the result which is on the top of the stack when the call completes. If
  1345.  
  1346.  
  1347. a debugger is loaded that does not support this feature you will get a
  1348.  
  1349.  
  1350. standard tool locator error. For version 1.5b8 the version number returned
  1351.  
  1352.  
  1353. is $158F .As you might expect, this number will change as the debugger
  1354.  
  1355.  
  1356. version changes and it will always go up, never down.
  1357.  
  1358.  
  1359.  
  1360.  
  1361. Glue Snypher:
  1362.  
  1363.  
  1364. Glue snypher is a routine that can recognize high level language tool calls
  1365.  
  1366.  
  1367. that are made with the standard glue entry, when a call to glue is detected
  1368.  
  1369.  
  1370. while disassembling an instruction the call to glue will be replaced with
  1371.  
  1372.  
  1373. *_TooName in a manner similar to how real tool calls now work. Glue 
  1374. snypher
  1375.  
  1376.  
  1377. is also used by the memory protect feature, if a glue call is detected
  1378.  
  1379.  
  1380. while the standard toolbox memory protect range is on, the glue call will
  1381.  
  1382.  
  1383. be treated as if it were a JSL >$e10000.  All glue entries MUST be a JSL
  1384.  
  1385.  
  1386. to one of 3 standard types of glue that are shown below:
  1387.  
  1388.  
  1389.  
  1390.  
  1391. ToolGlueType1   LDX #$ToolNum
  1392.  
  1393.  
  1394.     JSL >$E10004
  1395.  
  1396.  
  1397.     ...
  1398.  
  1399.  
  1400.     RTL
  1401.  
  1402.  
  1403.  
  1404. ToolGlueType2   LDX #$ToolNum
  1405.  
  1406.  
  1407.     JML CommonCall
  1408.  
  1409.  
  1410.     ...
  1411.  
  1412.  
  1413. CommonCall  JSL >$E10004
  1414.  
  1415.  
  1416.     ...
  1417.  
  1418.  
  1419.     RTL
  1420.  
  1421.  
  1422.  
  1423. ToolGlueType3   LDX #$ToolNum
  1424.  
  1425.  
  1426.     JMP CommonCall
  1427.  
  1428.  
  1429.  
  1430. If any other types of glue calls are used, they will not be properly 
  1431. detected.
  1432.  
  1433.  
  1434.  
  1435.  
  1436. Glue Breaks:
  1437.  
  1438.  
  1439. In addition to glue snypher further support was added for high level
  1440.  
  1441.  
  1442. languages by extending the tool break support to the glue vector 
  1443. ($E10004).
  1444.  
  1445.  
  1446. Since error conditions are treated differently with glue (The second RTL
  1447.  
  1448.  
  1449. ain't mine no more...) it seems unreasonable to also support error breaks
  1450.  
  1451.  
  1452. via the glue vector. 
  1453.  
  1454.  
  1455.  
  1456.  
  1457. OSBreaks:
  1458.  
  1459.  
  1460. OSBreaks work very much the same way that tool breaks work with three
  1461.  
  1462.  
  1463. exceptions. First, instead of breaking on a tool call they will break on
  1464.  
  1465.  
  1466. a call to the OS. Next, you can NOT specify an OS break by name, only by
  1467.  
  1468.  
  1469. number. Lastly, they are not supported in trace mode, only in real time
  1470.  
  1471.  
  1472. mode.  To use OSBreaks you simply type setOSBrk #xxxx where xxxx is the 
  1473.  
  1474.  
  1475. number of the OS routine that you want to break on. This number is 
  1476. matched
  1477.  
  1478.  
  1479. exactly when an OS call is made, so if you do not know if the target call
  1480.  
  1481.  
  1482. is class 0 or class 1 you must set the break for both calls. OSBreaks are
  1483.  
  1484.  
  1485. supported via both vectors, inline and stackbased. The following is a
  1486.  
  1487.  
  1488. list of commands that operate on OS breaks and what they do.
  1489.  
  1490.  
  1491.  
  1492. SetOSBrk - adds a number to the OS break list
  1493.  
  1494.  
  1495. ClrOSBrk - Removes a given number from the OS break list
  1496.  
  1497.  
  1498. ClrAllOSBrk - Removes all numbers from the OS break list
  1499.  
  1500.  
  1501. OSBrkIn - enables real time scanning for OS breaks
  1502.  
  1503.  
  1504. OSBrkOut - disables real time scanning of OS breaks
  1505.  
  1506.  
  1507. ShowBrks - lists all tool and OS breaks currently set.
  1508.  
  1509.  
  1510.  
  1511.  
  1512. DA Debugging support:
  1513.  
  1514.  
  1515. In the past it has always been difficult to debug certain new desk
  1516.  
  1517.  
  1518. accessories because they accept keystrokes, and keep the debugger from
  1519.  
  1520.  
  1521. receiving them. I have added a patching mechanism to the system event
  1522.  
  1523.  
  1524. call that is installed when the debugger is installed that fixes this
  1525.  
  1526.  
  1527. problem. The way this feature now works is that if the caps lock key is
  1528.  
  1529.  
  1530. down no keyboard events get passed to system event (and then to any open
  1531.  
  1532.  
  1533. DA's) and the debugger will always get them. A side effect of this is that
  1534.  
  1535.  
  1536. when the debugger screen is not active applications will get the same
  1537.  
  1538.  
  1539. keystroke events if the CAPS LOCK key is down. As a gentle reminder of
  1540.  
  1541.  
  1542. this feature, when installed, it will make your GS speaker click whenever
  1543.  
  1544.  
  1545. a key is processed by getNextEvent.  The debugger used to click on every
  1546.  
  1547.  
  1548. keystroke, regardless of the state of the CAPS LOCK key.  Dave complained
  1549.  
  1550.  
  1551. enough that the debugger was changed to only click when keys are pressed
  1552.  
  1553.  
  1554. if the CAPS LOCK key is down.
  1555.  
  1556.  
  1557.  
  1558.  
  1559. New Template types:
  1560.  
  1561.  
  1562.  
  1563. We have added support for a few more data types in templates, these are
  1564.  
  1565.  
  1566. mainly for use with GS/OS strings, but can also be used for any word
  1567.  
  1568.  
  1569. length string. they are:
  1570.  
  1571.  
  1572.  
  1573.     InputStr:   This type will read the next word of data and treat it as
  1574.  
  1575.  
  1576.                 a length word for string data that follows. The entire
  1577.  
  1578.  
  1579.                 contents of the string will be displayed.
  1580.  
  1581.  
  1582.  
  1583.     OutputStr:  Similar to InputStr except that the first word is a buffer
  1584.  
  1585.  
  1586.                 length and the second word is the string length. After the
  1587.  
  1588.  
  1589.                 string is displayed the debugger will skip to the end of
  1590.  
  1591.  
  1592.                 the buffer to find the next byte of data to process.
  1593.  
  1594.  
  1595.  
  1596.  
  1597. RealTime Conditional Breakpoints:
  1598.  
  1599.  
  1600.  
  1601. The debugger now supports conditional real time breakpoints. In the past
  1602.  
  1603.  
  1604. when a breakpoint was entered in the breakpoint list and you used the IN
  1605.  
  1606.  
  1607. feature to make them work real time, the trigger count that you entered
  1608.  
  1609.  
  1610. was ignored. Now, If you the trigger count is supported the same way it is
  1611.  
  1612.  
  1613. supported in trace mode, that is, if you insert a real time breakpoint
  1614.  
  1615.  
  1616. with a count higher than 1 it will break on the Nth execution of the
  1617.  
  1618.  
  1619. opcode at that location. NOTE: Currently the following opcodes are not
  1620.  
  1621.  
  1622. supported as real time conditional breakpoints: JSL(mem), JSR(mem),
  1623.  
  1624.  
  1625. JSR(mem,x), JMP(mem), JMP(mem,x), RTI.
  1626.  
  1627.  
  1628.  
  1629. In addition to supporting a count value for real time break points, the
  1630.  
  1631.  
  1632. debugger now also allows a simple conditional statement to be used 
  1633. instead.
  1634.  
  1635.  
  1636. The debugger allows only one conditional statement at a time, but as many
  1637.  
  1638.  
  1639. of the breakpoints can use it as you want. To enable the conditional
  1640.  
  1641.  
  1642. statement (henceforth called IF) simply type an "i" when entering a
  1643.  
  1644.  
  1645. breakpoints trigger value instead of a hex digit. To set the current IF
  1646.  
  1647.  
  1648. use the command SetIF. the syntax of the SetIF command is as follows:
  1649.  
  1650.  
  1651.  
  1652.     SETIF {width} {Spec1}{Operator}{Spec2}
  1653.  
  1654.  
  1655.  
  1656. Legal {width} values
  1657.  
  1658.  
  1659.      W  for word 
  1660.  
  1661.  
  1662.      B  for byte
  1663.  
  1664.  
  1665.  
  1666. Legal {Operator} values
  1667.  
  1668.  
  1669.     =   for is equal to
  1670.  
  1671.  
  1672.     #   for is NOT equal to
  1673.  
  1674.  
  1675.     <   for is less than
  1676.  
  1677.  
  1678.     >   for is Greater than or equal to
  1679.  
  1680.  
  1681.  
  1682. Legal {Spec1} and {Spec2} values are
  1683.  
  1684.  
  1685.     A,X,Y,S,D,P,B   for the corresponding register
  1686.  
  1687.  
  1688.     $BBXXXX     as the address of a value in memory
  1689.  
  1690.  
  1691.     #$XXXX      as a hexidecimal constant ({SPEC2} only)
  1692.  
  1693.  
  1694.  
  1695. Some examples of IFs
  1696.  
  1697.  
  1698.  
  1699.     SETIF W A<#$0101        (Break if the word in <A> is less than #$0101)
  1700.  
  1701.  
  1702.     SETIF B $021234=$034321 (Break if the bytes at $02/1234 and 
  1703. $03/4321
  1704.  
  1705.  
  1706.                              are the same.)
  1707.  
  1708.  
  1709.  
  1710. NOTE: Currently only long addresses are supported.
  1711.  
  1712.  
  1713.